package net.knightwatch.kwtools.database; 

import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class ItemTable {
	// Class Information
				private static final String TAG = "ItemTable";
				// Database Table
				public static final String TABLE_ITEM = "Items";
				public static final String COLUMN_ID = "_id";
				public static final String COLUMN_ITEM_TYPE_ID = "itemTypeId";
				public static final String COLUMN_POTENTIAL_ID = "potentialId";
				public static final String COLUMN_LATITUDE = "latitude";
				public static final String COLUMN_LONGITUDE = "longitude";
				public static final String COLUMN_ALTITUDE = "altitude";
				public static final String COLUMN_ELAPSED_TIME = "elapsedTime";
				public static final String COLUMN_NAME = "name";
				
				// Database Creation SQL Statement
				private static final String DATABASE_CREATE = "create table " 
						+ TABLE_ITEM
						+ "("
						+ COLUMN_ID + " integer primary key autoincrement, "
						+ COLUMN_ITEM_TYPE_ID + " integer not null,"
						+ COLUMN_POTENTIAL_ID + " integer not null,"
						+ COLUMN_NAME + " text,"
						+ COLUMN_LATITUDE + " text,"
						+ COLUMN_LONGITUDE + " text,"
						+ COLUMN_ALTITUDE + " text,"
						+ COLUMN_ELAPSED_TIME + " integer"
						+ ");";

				
				public static void onCreate(SQLiteDatabase database) {
					Log.i(TAG, DATABASE_CREATE);
					database.execSQL(DATABASE_CREATE);
					// Create the default item types
					
				}
				public static void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion){
					
				}
}